<div class="row">
    <div class="col-md-8" style="width: 100%;">
        <?php if( isset( $this->adsById->id ) ): ?>
            <h4>
                <a href="<?php echo URL_BASE ?>vpanel/"><i class="glyphicon glyphicon-home"></i></a> &raquo; <a id="link_to_pages" href="<?php echo URL_BASE ?>admin/?id=ad"">Advertising</a> &raquo; <?php echo stripslashes( $this->CategoryById->title ) ?>
                <a data-id="<?php echo $_GET['edit_ads'] ?>" id="delete_ads" class="btn btn-primary" href="javascript:void(0);">
                    <i class="glyphicon glyphicon-remove"></i> Delete Ads
                </a>
            </h4>
            <hr />
            <div class="col-lg-12 col-md-12 col-sm-12">
                <form action="" method="post" class="form-horizontal"  enctype="multipart/form-data" id="form_ads" >
                    <div class="form-group">
                        <label for="inputEmail3" class="col-sm-2 control-label">Link</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="link" placeholder="Link" name="href" value="<?php echo $this->adsById->href ?>">
                            <input type="hidden" name="id" value="<?php echo $_GET['edit_ads'] ?>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputEmail3" class="col-sm-2 control-label">Position</label>
                        <div class="col-sm-10">
                            <select class="form-control" name="position" id="">
                                <option value="0">Chose Position</option>
                                <option <?php if($this->adsById->position == 'left'){echo 'selected="selected"';} ?> value="left">Left</option>
                                <option <?php if($this->adsById->position == 'right'){echo 'selected="selected"';} ?> value="right">Right</option>
                            </select>
                            <div id="inputList">
                                <input type="hidden" name="image" value="<?php echo $this->adsById->images ?>">
                            </div>
                        </div>
                    </div>
                    <input style="position: absolute;right: 0px" type="submit" name="submit" value="Save" id="button_update" class="btn btn-primary bt_update edit_ads" />
                </form>
            </div>
            <form  action="" method="post" class="form-horizontal dropzone"  enctype="multipart/form-data" id="dropzone">
                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label">Image</label>
                    <div class="col-sm-5">
                        <div id="container">
                            <a id="pickfiles" href="javascript:;">[Select files]</a>
                        </div>
                        <div id="filelist">
                            <img width="100" src="./upload/<?php echo $this->adsById->images ?>" />
                            <b><?php echo $this->adsById->images ?></b>
                        </div>
                    </div>
                </div>
            </form><!-- Form -->
        <?php
        else:
            ?>
            <div class="alert alert-danger">
                <i class="glyphicon glyphicon-remove"></i> There are no results
            </div>
        <?php endif; ?>
    </div>
</div><!-- End row -->
